xen/netfront: force data bouncing when backend is untrusted
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 7 Apr 2022 10:20:06 +0000 (12:20 +0200)
committerBen Hutchings <benh@debian.org>
Sat, 23 Jul 2022 22:32:10 +0000 (23:32 +0100)
commit8e6fa24336426f7c906bb1a9dd9e7ceeceb91a83
treef9440fd179bff18dde64df97ac56bf8fafb8eaba
parent9760cb576a565d8313ce74e70c703f286cd829b8
xen/netfront: force data bouncing when backend is untrusted

Origin: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=4923217af5742a796821272ee03f8d6de15c0cca
Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2022-33741

commit 4491001c2e0fa69efbb748c96ec96b100a5cdb7e upstream.

Bounce all data on the skbs to be transmitted into zeroed pages if the
backend is untrusted. This avoids leaking data present in the pages
shared with the backend but not part of the skb fragments.  This
requires introducing a new helper in order to allocate skbs with a
size multiple of XEN_PAGE_SIZE so we don't leak contiguous data on the
granted pages.

Reporting whether the backend is to be trusted can be done using a
module parameter, or from the xenstore frontend path as set by the
toolstack when adding the device.

This is CVE-2022-33741, part of XSA-403.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name xen-netfront-force-data-bouncing-when-backend-is-unt.patch
drivers/net/xen-netfront.c